package org.yaaic.activity;

import org.yaaic.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class UserInfoActivity extends Activity implements OnClickListener {

    EditText nickName, realName;
    Button saveAndContinue;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);

        setContentView(R.layout.userinfo);
        initializeVars();
        saveAndContinue.setOnClickListener(this);
    }

    private void initializeVars() {
        // TODO Auto-generated method stub
        nickName = (EditText) findViewById(R.id.etNickName);
        realName = (EditText) findViewById(R.id.etRealName);
        saveAndContinue = (Button) findViewById(R.id.btnSaveAndContinue);
    }

    @Override
    protected void onPause() {
        // TODO Auto-generated method stub
        super.onPause();
        //        ourSound.release();
        finish();   //finish splash activity, get rid of it, unless they open app again.
    }

    @Override
    public void onClick(View v)
    {
        // TODO Auto-generated method stub
        String nick = nickName.getText().toString();


        Bundle basket = new Bundle();
        basket.putString("key", nick);
        Intent intent = new Intent(UserInfoActivity.this, ServersActivity.class);   //this links this Bundle together with OpenedClass
        intent.putExtras(basket);
        startActivity(intent);

    }




}
